package tgc.edu.demo.jkxt.repository;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import tgc.edu.demo.jkxt.custom.BaseRepository;
import tgc.edu.demo.jkxt.entity.Question;
@Repository
public interface QuestionRepository extends BaseRepository<Question, Integer>{
	@Query(value = "SELECT * from question WHERE zhishi_id in (SELECT id FROM knowledge WHERE course_id=(SELECT coures_id FROM shijuan WHERE id=?))",nativeQuery =true)
	public List<Question> findQuestionByCourseId(Integer id);

}
